import {getMutationComponent, getQueryComponent} from '../util'
import CloseModalMutation from './CloseModal.gql'
import CurrentUserQuery from './CurrentUser.graphql'
import gql from 'graphql-tag'

export const CloseModal = getMutationComponent(CloseModalMutation)

export const OpenModal = getMutationComponent(gql`
    mutation openModal  ($name: String!, $title: String, $args: Json, $width:String) {
        openModal  (name: $name, title:$title, args:$args,width:$width) @client
    }
`)

export const CurrentUser = getQueryComponent(CurrentUserQuery)